package com.youxue.teachin.splash;

import android.os.Bundle;
import android.support.annotation.Nullable;
import com.Navigator;
import com.library.uiframework.activity.BaseActivity;
import com.youxue.teachin.common.utils.SchemaParam;
import com.youxue.teachin.common.utils.SchemaPath;

/**
 * 在此写用途
 *
 * @author: zhiwei
 * @date: 2017-10-05 17:01
 * @version: 9.1.0
 */
public class SplashActivity extends BaseActivity implements ISplashView {
    SplashPresenter mSplashPresenter = new SplashPresenter(this);

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        registerPageLifecycle(mSplashPresenter);
    }

    @Override
    public void toLogin() {
        new Navigator.Builder()
            .setPageName(SchemaPath.PAGE_LOGIN)
            .addParameter(SchemaParam.TOLAUNCHE, true)
            .build().open();
        finish();
    }

    @Override
    public void toLauncher() {
        new Navigator.Builder()
            .setPageName(SchemaPath.PAGE_MAIN_LANCHER)
            .build().open();
        finish();
        //new Navigator.Builder()
        //    .setPageName(SchemaPath.PAGE_TEST)
        //    .build().open();r()
        //    .setPageName(SchemaPath.PAGE_TEST)
        //    .build().open();
    }
}
